Scheduling Mac to shutdown and start up

Since I’ve updated my system, of course as many are aware, the shut down and startup schedules were wiped since there is no longer an option to do it via system settings.

I had a good look online and found Apple giving a solution which is to use terminal.

I managed to prepare two codes which I used on my Mac Mini with Sonoma:

sudo pmset repeat shutdown MTWRFSU 18:00:00


sudo pmset repeat poweron MTWRFSU 08:00:00